package Packet;

import java.util.*;
import java.io.*;
import Core.Model.*;

import javax.swing.*;

public class PacketFactory 
{
	public PacketFactory()
	{
	}
    public Packet makeClientLoginPacket(int sourceId, int destinationId, String userName, String password, ClientType type)
    {
    	Properties prop = new Properties();
    	prop.put(CLIENT_USER_NAME, userName);
    	prop.put(CLIENT_USER_PASSWORD, password);
    	prop.put(CLIENT_USER_TYPE, type);
    	return new Packet(PacketType.ClientLoginPacket, sourceId, destinationId, prop);
    }
    
    public Packet makeClientLoginSucessfulPacket(int sourceId, int destinationId, Serializable content)
    {
    	return new Packet(PacketType.ClientLoginSucessfulPacket, sourceId, destinationId, content);
    }
    
    public Packet makeClientLoginNoAccountPacket(int sourceId, int destinationId, Serializable content)
    {
    	return new Packet(PacketType.ClientLoginNoAccountPacket, sourceId, destinationId, content);
    }
    
    public Packet makeClientLoginPasswordErrorPacket(int sourceId, int destinationId, Serializable content)
    {
    	return new Packet(PacketType.ClientLoginPasswordErrorPacket, sourceId, destinationId,content);
    }
    
    public Packet makeTeamTestDataSubmitPacket()
    {
    	return new Packet();
    }
    public Packet makeTeamTestResultPacket()
    {
        return new Packet();	
    }
    public Packet makeTeamQuestionSubmitPacket()
    {
    	return new Packet();
    }
    public Packet makeTeamQuestionAnswerPacket()
    {
    	return new Packet();
    }
    
    public Packet makeContestClockStartPacket()
    {
    	return new Packet();
    }
    public Packet makeContestClockPausePacket()
    {
    	return new Packet();
    }
    public Packet makeContestClockStopPacket()
    {
    	return new Packet();
    }
    
    public static final String CLIENT_USER_NAME = "CLIENT_USER_NAME";
    public static final String CLIENT_USER_PASSWORD = "CLIENT_USER_PASSWORD";
    public static final String CLIENT_USER_TYPE = "CLIENT_USER_TYPE";
    
    
    public static final int sourceId = 1;
	public static final int destinationId = 2;
}